<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:cc="http://java.sun.com/jsf/composite">

    <cc:interface componentType="org.jboss.seam.faces.InputContainer">
        <cc:attribute name="label" required="true"/>
        <cc:attribute name="required" required="false"/>
        <cc:attribute name="ajax" required="false" default="false"/>
        <cc:attribute name="inputs" required="false" default="1"/>
    </cc:interface>

    <cc:implementation>

        <div class="entry" id="#{cc.clientId}">
            <h:outputLabel id="label" for="" value="#{cc.attrs.label}:"
                           styleClass="#{cc.attrs.invalid ? 'label errors' : 'label'}">
                <h:panelGroup styleClass="required" rendered="#{cc.attrs.required}">*</h:panelGroup>
            </h:outputLabel>
         <span class="#{cc.attrs.invalid ? 'input errors' : 'input'}">
            <cc:insertChildren/>
         </span>
            <h:panelGroup rendered="#{cc.attrs.invalid}">
                <c:forEach var="i" begin="1" end="#{cc.attrs.inputs}">
                    <h:message id="message#{i}" for="" styleClass="error errors"/>
                </c:forEach>
            </h:panelGroup>
        </div>

    </cc:implementation>

</ui:composition>
